#ifndef PLAYOBJECT_H
#define PLAYOBJECT_H

#include <QWidget>
#include <QPainter>

#include "demux.h"

class PlayObject : public QWidget
{
    Q_OBJECT
public:
    explicit PlayObject(QWidget *parent = nullptr);

    void setUrl(const QString & url);
    void paly();
    void stop();
    void setPause();
    void setSpeed(const double &speed);
    void setPreviousFrame();
    void seekFrame(const bool &isNextFrame);

    Demux* getDemux();

protected:
    virtual void paintEvent(QPaintEvent *);

private slots:
    void receiveQImage(const QImage &img);

private:
    QImage _img;

    Demux * _demux;

signals:

};

#endif // PLAYOBJECT_H
